1. Field of the Invention
The present invention relates to a multi-microcomputer system comprising a plurality of microcomputers and used in electronic apparatuses such as domestic appliances and electronic endoscopes.
2. Description of the Related Art
Microcomputers storing operating programs in accordance with various purposes have been installed in various kinds of electronic apparatuses, namely in domestic appliances such as TV sets and VCRs, and in electronic medical apparatuses such as cardiographs and endoscopes, for example. In order to prevent electric shocks from being applied to a human body, some of these electronic apparatuses have xe2x80x9cisolation meansxe2x80x9d for isolating a circuit thereof in a portion made of a material that a human body is in direct contact with from a circuit thereof in a portion operating by the power supplied from an alternating current source, or for isolating the circuit from an external apparatus. Especially, for electronic medical apparatuses such as cardiographs and endoscopes, isolation of a portion of a cardiograph to be in direct contact with a human body or a scope unit of an electronic endoscope from a ground circuit is defined in a safety standard (IEC60601-1, JIS T1001, UL2601-1, for example).
For example, an electronic endoscope comprises a scope unit having imaging means such as a CCD imaging element located at the end thereof, and a video processor unit for processing a signal obtained by the scope unit and for outputting the processed signal to an output apparatus such as an image monitor connected to the endoscope. The isolation means is generally located in the video processor unit. The isolation means is installed in order to isolate the scope unit from an operation switch on the front of an enclosure containing the video processor unit and from an external apparatus such as the output apparatus like the image monitor described above. A microcomputer is located in either a circuit on a scope-unit side (hereinafter called a patient-side circuit) within the video processor unit or in a circuit within the external apparatus or the operation switch isolated by the isolation means (hereinafter called an IO[Input/Output]-side circuit). Since the microcomputer mainly controls the imaging means and the signal processing, the microcomputer is generally located in the patient-side circuit.
When the microcomputer is located in the patient-side circuit, the isolation means (an isolation unit) such as a photocoupler is necessary for each signal line (such as a data line and a control line) between the microcomputer and the operation switch or between the microcomputer and the external apparatus. Communication between the microcomputer and the external apparatus is carried out as serial communication or parallel communication in accordance with a communication protocol of the external apparatus. In the case of parallel communication, the number of photocouplers in the isolation means becomes much larger than in the case of serial communication, since each of multiple signal lines needs to be isolated. Since the microcomputer in the endoscope needs to deal with the communication protocol of the external apparatus, reduction in the number of photocouplers by entirely adopting serial communication with the external apparatus is impossible. In the case where the kind of external apparatuses which can be connected to the microcomputer is increased, the isolation means needs to be installed for each of the external apparatuses, due to a difference in the communication protocol. Therefore, the number of photocouplers further increases in some cases.
When the isolation unit such as a photocoupler is mounted on a circuit board, an area occupied by the isolation unit for each signal line is large and a distance for isolation needs to be reserved. Therefore, the number of parts increases and the electronic apparatus becomes large. As a result, the larger the number of the signal lines becomes, the lower the reliability of the entire apparatus becomes.
In order to solve this problem, a multi-microcomputer system can be used for an electronic endoscope. In this system, a main microcomputer is located in the patient-side circuit and a sub-microcomputer is also located in the IO-side circuit. The sub-microcomputer in the IO-side circuit carries out processing between the system and the external apparatus or between the system and the operation switch. In this manner, no direct communication between the main microcomputer in the patient-side circuit and the external apparatus can be carried out, and the number of photocouplers is thus reduced.
However, if a multi-microcomputer system is adopted, new data lines and control lines between the main microcomputer and the sub-microcomputer are necessary. Each data line or control line needs to have a photocoupler or the like in this case, and the number of isolation units may not necessarily be reduced as a result.
Meanwhile, in order to add a more convenient function or to manage a new scope unit or external apparatus, an electronic apparatus mounting a microcomputer enables update or upgrade of an operating program thereof in some cases. By appropriately improving the operating program, functions of the apparatus are enriched and convenience of the apparatus is improved. For example, in the case of an endoscope, when a new scope unit is adopted or a new external apparatus is managed, version-up is necessary.
The operating program can be updated by exchanging an old ROM (Read Only Memory) storing the current operating program with a new ROM storing a new operating program, by using an IC socket on a circuit board which can install the ROM storing the operating program.
However, in the case where the multi-microcomputer system uses ROMs of the same shape, which of the ROMs needs to be changed may not be obvious. For example, an old ROM for the main microcomputer may be changed to a new ROM for the sub-microcomputer. Furthermore, management of the ROM""s becomes troublesome.
The present invention has been conceived based on consideration of the above problems. A first object of the present invention is to provide a multi-microcomputer system enabling update of an operating program of each microcomputer therein by using a simple method and not causing a problem in ROM management or erroneous insertion of a ROM.
A second object of the present invention is to provide a multi-microcomputer system enabling further reduction in the number of isolation units.
Recently, a multi-microcomputer system using a plurality of microcomputers in order to improve efficiency in processing or the like has also been proposed. When a multi-microcomputer system is employed by an electronic endoscope, two forms are possible. One is to place a main microcomputer in a patient-side circuit and to place a sub-microcomputer in an IO-side circuit, and the other is vice versa.
When exchanging ROM""s, an enclosure of the system is opened, with the power being OFF. After an old ROM storing a current operating program is detached from an IC socket, a new ROM storing a new operating program is installed. This operation is troublesome.
When the multi-microcomputer system is used, new data lines and control lines between a main microcomputer and a sub-microcomputer are necessary. For each of the lines, an isolation unit such as a photocoupler needs to be installed. Therefore, the number of the isolation units increases.
The present invention has been conceived based on consideration of the above problems, and a third object of the present invention is to provide a multi-microcomputer system enabling reduction in the number of isolation units and update of an operating program of each microcomputer by a simple operation without causing a problem in ROM management.
A first multi-microcomputer system of the present invention achieving the first object described above enables update of an operating program of a slave microcomputer by transferring an operating program for updating (hereinafter called update operating program) read from a memory for updating (hereinafter called update memory) and by rewriting the operating program of the slave microcomputer with the update operating program for the slave microcomputer in the case where the update memory storing the operating program for the slave microcomputer is installed in a master circuit. In other words, the first multi-microcomputer system of the present invention is a multi-microcomputer system formed with the master microcomputer and the slave microcomputer. The system comprises:
a socket for installing the update memory storing the update operating program in the master circuit in which the master microcomputer is located; and the master microprocessor comprises:
a master processing unit for judging whether or not the update operating program for the slave microcomputer is stored in the update memory when the update memory is installed in the socket, and for transferring the update operating program to a slave circuit having the slave microcomputer therein in the case where the memory has been judged to store the update operating program; while the slave microcomputer comprises:
a program memory for storing a current operating program; and
a slave processing unit for updating the current operating program with the update operating program when the update operating program is transferred.
The xe2x80x9cmaster microcomputerxe2x80x9d herein referred to means a microcomputer for transferring the update operating program read from the update memory to the slave microcomputer which is separated form the master microcomputer, as has been described above. Meanwhile, the xe2x80x9cslave microcomputerxe2x80x9d means a microcomputer for rewriting the current operating program with the update operating program having been transferred. A microcomputer carrying out main processing of an apparatus is generally called a main microcomputer and a microcomputer carrying out processing other than the main processing is called a sub-microcomputer. The master and slave microcomputers are different from the main microcomputer and the sub-microcomputer. Therefore, the main microcomputer and the sub microcomputer may be the master and slave microcomputers respectively in some cases, while a sub-microcomputer may be the master microcomputer in other cases. The number of slave microcomputers is not limited to one and a plurality of the slave microcomputers may be used.
To xe2x80x9cupdate the current operating program with the update operating programxe2x80x9d means to rewrite program data within the program memory with program data different from the program data of the current operating program. At the time of this rewriting, any method such as non-segmented copy (complete rewriting), partial copy (partial rewriting), and patching (addition of a correction program) can be adopted.
When judgment as to xe2x80x9cwhether or not the update operating program for the slave microcomputer is storedxe2x80x9d is carried out, any method such as referring to a key input by an operator may be used. However, it is preferable for the system to carry out automatic judgment adopting the following method in order not to cause a problem for an operator or in order to avoid carrying out unnecessary program transfer.
In other words, the slave processing unit transfers version information of the current operating program to the master processing unit and
the master processing unit reads version information of the update operating program from the update memory and judges whether the update operating program for the slave microcomputer is stored in the update memory by comparing the version information of the update operating program having been read with the version information of the current operating program having been transferred.
The xe2x80x9cversion informationxe2x80x9d means information enabling distinction between the content of update operating program and the current operating program when the two programs are different from each other. As this version information, an identification name of each operating program may be used if available. Alternatively, a time stamp may be used.
In the first multi-microcomputer system of the present invention, it is preferable for the update memory to store a program for rewriting a program (hereinafter called program-rewriting program) so that the master processing unit can read the program-rewriting program from the update memory when the update memory is installed in the socket and can transfer the program having been read to the slave circuit. Furthermore, it is also preferable for the slave microcomputer to comprise a memory for expansion (hereinafter called an expansion memory) for storing the program-rewriting program so that the master processing unit can write the program-rewriting program having been transferred in the expansion memory and updates the operating program by using the program-rewriting program having been written in the expansion memory.
Moreover, it is preferable for the first multi-microcomputer system of the present invention to carry out signal transmission between the both microcomputers according to start-stop synchronization communication which is a kind of serial communication methods so that the communication can be carried out using a lower number of signal lines. For this purpose, it is preferable for the system to be configured in the following manner. In other words, the system comprises a first signal conversion circuit for outputting parallel data input from the master processing unit to the slave circuit after converting the data into a start-stop synchronization signal and for outputting a start-stop synchronization signal input from the slave circuit to the master processing unit after converting the signal into parallel data, and a second signal conversion circuit for outputting parallel data input from the slave processing unit to the master circuit after converting the data into a start-stop synchronization signal and for outputting a start-stop synchronization signal input from the master circuit to the slave processing unit after converting the signal into parallel data.
If the first and the second signal conversion units are formed with asynchronous data transfer LSI""s having functions of parallel-serial conversion and serial-parallel conversion, that is, with universal asynchronous receiver transmitters (UART""s) more specifically, the signal conversion circuits can be configured in an extremely simple manner.
It is also preferable for the system to comprise isolation means for electrically isolating the first signal conversion circuit from the second signal conversion circuit so that the master circuit in which the master microcomputer is located and the slave circuit in which the slave microcomputer is located are electrically isolated from each other.
A second multi-microcomputer system of the present invention achieving the second object described above carries out signal transmission between a master microcomputer and a slave microcomputer according to the start-stop synchronization method which is a serial communication method, and enables substantial reduction in the number of isolation units by installing the isolation units for signal lines of 2 systems, namely input and output systems for the start-stop synchronization communication. In other words, the second multi-microcomputer system of the present invention is a multi-microcomputer system formed with a master microcomputer and a slave microcomputer, and the second multi-microcomputer system comprises a first signal conversion circuit for outputting parallel data input from the master microcomputer to the slave microcomputer after converting the data into a start-stop synchronization signal and for outputting a start-stop synchronization signal input from the slave microcomputer to the master microcomputer after converting the signal into parallel data, a second signal conversion circuit for outputting parallel data input from the slave microcomputer to the master microcomputer after converting the data into a start-stop synchronization signal and for outputting a start-stop synchronization signal input from the master microcomputer to the slave microcomputer after converting the signal into parallel data, and isolation means for electrically isolating the first signal conversion circuit from the second signal conversion circuit.
If the first and second signal conversion circuits are formed with asynchronous data transfer LSI""s having functions of parallel-serial conversion and serial-parallel conversion, that is, with UART""s more specifically, the signal conversion circuits can be configured in an extremely simple manner.
It is preferable for the first or second multi-microcomputer system having the isolation means to be applied to an electronic endoscope having imaging means at the end thereof and having the master and slave microcomputers in a scope-side circuit and in a circuit for interface with externally-connected apparatus, respectively.
According to the first multi-microcomputer system of the present invention, the update operating program read from the update memory is transferred to the slave microcomputer when the update memory storing the update operating program for the slave microcomputer is installed in the socket of the master circuit, and updates the operating program of the slave microcomputer by rewriting the operating program with the update operating program having been transferred. Therefore, by installing in turns in the socket each update memory storing the update operating program for each microcomputer, the operating program of each microcomputer can be updated, and erroneous insertion or troublesome management of ROM""s are avoided.
Furthermore, if which program needs to be updated and which operating programs are old or new are judged automatically by the version comparison, the slave microcomputer does not transfer an unnecessary update operating program which would not actually be used, and erroneous rewriting of the operating program is prevented. In this manner, a plurality of operating programs for a plurality of the microcomputers can be updated easily and with certainty.
If not only the update operating program but also the program-rewriting program are transferred, appropriate update processing in accordance with the form of the update operating program can be realized. For example, the update operating program may be stored in the update memory as compressed data and a program-rewriting program of a decompression algorithm corresponding to the compression algorithm may be transferred to expand the update operating program. Therefore, the update memory storing the update operating program using any compression algorithm can be supplied. Moreover, if the program-rewriting program is necessarily stored in the update memory and transferred to the slave microcomputer after being read from the update memory, it becomes needless to store the program-rewriting program in the program memory in the slave microcomputer, and the memory space saved in this manner can be used as an area for storing a program. In this manner, the program memory can be used efficiently.
Furthermore, if the signal transmission between the both microcomputers is carried out according to the start-stop synchronization communication method, the number of signal lines connecting the two microcomputers is reduced substantially. In this case, the master circuit having the master microcomputer therein is isolated from the slave circuit having the slave microcomputer therein by the isolation unit for the 2-system signal lines of input and output for start-stop synchronization communication, and the number of isolation units can also be reduced.
If the signal conversion circuits are formed with the asynchronous data transfer LSI""s having the serial-parallel and parallel-serial conversion functions, the configuration of the signal conversion circuits can be made extremely simple.
Meanwhile, according to the second multi-microcomputer system of the present invention, the signal conversion circuits are formed to transmit a signal according to the start-stop synchronization communication which is the serial communication method between the master and the slave microcomputers, and the isolation units are formed for the 2-system signal lines of input and output for the start-stop synchronization communication. Therefore, not only update of the operating program but also other processing can be carried out bidirectionally with the signal lines. As a result, the number of the isolation units can be reduced substantially.
When connecting an apparatus adopting the multi-microcomputer system of the present invention with an external apparatus, if the external apparatus is connected with the slave circuit which is electrically isolated from the master circuit and if the external apparatus is directly controlled by the slave microcomputer in the slave circuit, the master and slave microcomputers can be connected by start-stop synchronization communication using the 2-system signal lines, regardless of a communication protocol adopted by the external apparatus being serial or parallel, or regardless of a difference in communication protocols between external apparatuses. Therefore, without increasing the number of isolation units such as the photocouplers, the master circuit is isolated from the external apparatus and various forms of communication protocols adopted by external apparatuses can be dealt with. In this manner, a system having flexible extensibility can be configured.
If the first or the second multi-microcomputer system having the isolation means is used in a circuit in an endoscope having imaging means at the end thereof, that is, if the system is used in an endoscope having the master microcomputer in the patient-side circuit and the slave microcomputer in the IO-side circuit which is an interface with the external apparatus, the endoscope enables easy and secure update of the operating program of the two microcomputers by using the single socket. In this manner, functions of the endoscope can be extended easily and the convenience thereof improves.
Since the communication with the external apparatus can be assigned to the slave microcomputer, regardless of the communication protocol of the external apparatus, the number of isolation units can be reduced substantially between the master and slave microcomputers, that is, between the patient-side circuit and the IO-side circuit.
A third multi-microcomputer system of the present invention achieving the third object described above transfers to a slave microcomputer an update operating program when the program is transferred to a master circuit from an apparatus connected externally with an electronic apparatus mounting the system, and a current operating program of the slave microcomputer is updated by being replaced with the update operating program having been transferred.
In other words, the third multi-microcomputer system of the present invention is a multi-microcomputer system formed with a master microcomputer and a slave microcomputer, and the system comprises:
a signal level conversion circuit for outputting a signal output from a master circuit having the master microcomputer therein to an external apparatus after converting the signal into a signal of a voltage level of the external apparatus and for outputting a signal input from the external apparatus to the master circuit after converting the signal from the external apparatus into a signal of a voltage level of the master circuit.
The master microcomputer comprises a master processing unit for judging whether or not an update operating program is for the slave microcomputer when the program is transferred from the external apparatus via the signal level conversion circuit, and for transferring the update operating program to a slave circuit having the slave microcomputer therein in the case where the program has been judged to be for the slave microcomputer; and
the slave microcomputer comprises a program memory storing a current operating program and a slave processing unit for updating the current operating program thereof with the update operating program when the update operating program is transferred.
The xe2x80x9cmaster microcomputerxe2x80x9d herein referred to means a microcomputer for transferring the update operating program having been transferred from the external apparatus to the slave microcomputer which is different from the master microcomputer.
The signal level conversion by the signal level conversion circuit refers to either magnitude conversion or potential level conversion of the signal, or both.
When judging xe2x80x9cwhether or not the update operating program is for the slave microcomputerxe2x80x9d, any method such as referring to a key input by an operator may be used. However, in order not to trouble an operator and not to transfer unnecessary programs, it is preferable for the system to carry out automatic judgment according to the following method. In other words, the slave processing unit transfers version information of the current operating program to the master processing unit and the master processing unit obtains version information of the update operating program and judges whether or not the update operating program is for the slave microcomputer by comparing the version information of the update operating program with the version information of the current operating program having been transferred.
It is preferable for the system to automatically obtain the version information of the update operating program by referring to the program transferred from the external apparatus.
It is preferable for the third multi-microcomputer system of the present invention to be configured in the following manner. That is, the master processing unit transfers a program-rewriting program to the slave circuit when the program-rewriting program is transferred from the external apparatus via the signal level conversion circuit and the slave microcomputer comprises an expansion memory for storing the program-rewriting program so that the master processing unit writes the program-rewriting program having been transferred in the expansion memory and updates the operating program by using the program-rewriting program having been written in the expansion memory.
In the third multi-microcomputer system of the present invention, it is preferable for the signal level conversion circuit to carry out signal level conversion according to the RS-232C standard.
Furthermore, it is preferable for the third multi-microcomputer system of the present invention to carry out signal transmission between the two microcomputers according to the start-stop synchronization communication which is a serial communication method, so that the communication can be carried out by using a lower number of signal lines. For this purpose, the system comprises a first signal conversion circuit for outputting parallel data input from the master processing unit to the slave circuit after converting the data into a start-stop synchronization signal and for outputting a start-stop synchronization signal input from the slave circuit to the master processing unit after converting the signal into parallel data, and a second signal conversion circuit for outputting parallel data input from the slave processing unit to the master circuit after converting the data into a start-stop synchronization signal and for outputting a start-stop synchronization signal input from the master circuit to the slave processing unit after converting the signal into parallel data.
If the first and the second signal conversion units are formed with asynchronous data transfer LSI""s having functions of parallel-serial conversion and serial-parallel conversion, that is, with UART""s more specifically, the signal conversion circuits can be configured in an extremely simple manner.
It is preferable for the system to further comprise isolation means for electrically isolating the first and second conversion circuits from each other so that the master circuit having the master microcomputer therein is electrically isolated from the slave circuit having the slave microcomputer therein.
It is also preferable for the multi-microcomputer system having the isolation means described above to be applied to an endoscope having the master microcomputer and the slave microcomputer in a scope-side circuit having imaging means at the end thereof and in a circuit for interface with the apparatus externally connected thereto, respectively.
According to the third multi-microcomputer system of the present invention, when the update operating program for slave microcomputer is transferred from the external apparatus to the master circuit, update of the operating program for the slave microcomputer becomes possible by transferring the update operating program to the slave microcomputer and by rewriting the operating program of the slave microcomputer with the update operating program. Therefore, update of the operating program for each microcomputer becomes possible by transferring the update operating program to the corresponding microcomputer when the program is transferred from the external apparatus.
Furthermore, ROM exchange is not necessary and erroneous insertion of ROM and a problem associated with ROM management are avoided. Moreover, since the update operation can be carried out with the power being ON and without opening an enclosure, the operation becomes easier.
If not only the update operating program but also the program-rewriting program are transferred, appropriate update processing can be carried out in accordance with the form of the update operating program. For example, the update operating program may be transferred as compressed data and a program-rewriting program of decompression algorithm corresponding to the compression algorithm may be used to expand the update operating program. Therefore, the update operating program can be transferred by using any compression algorithm and the time necessary for transferring the update operating program becomes shorter. Moreover, if it the program-rewriting program is necessarily transferred to the master microcomputer and then to the slave microcomputer, it becomes needless to store the program-rewriting program in the program memory in the slave microcomputer, and the memory space saved in this manner can be used as an area for storing a program for other processing. In this manner, the program memory can be used efficiently.
If the signal level conversion is carried out according to the RS-232C standard, it becomes possible for the electronic apparatus mounting this system to be connected to the external apparatus via an RS-232C line which is a general purpose interface. As a result, a general purpose apparatus such as a personal computer can be used as an apparatus to transfer the update operating program to the master microcomputer, which improves convenience.
If the multi-microcomputer system having the isolation means is used in an endoscope having imaging means at the end thereof, that is, if the system is used in an endoscope having the master microcomputer in a scope-side circuit which is a patient-side circuit and having the slave microcomputer in an IO-side circuit which is an interface with external apparatus, the endoscope enables easy and secure update of the operating program of the both microcomputers by using the external apparatus. In this manner, functions of the endoscope can be extended easily and the convenience thereof improves.